Skip to content

ref: Move subprocess breadcrumbs to integration - #7128

Merged
sentrivana merged 6 commits into
masterfrom
ivana/move-breadcrumbs-to-integrations
Aug 7, 2026
Merged

ref: Move subprocess breadcrumbs to integration#7128
sentrivana merged 6 commits into
masterfrom
ivana/move-breadcrumbs-to-integrations

Conversation

@sentrivana

@sentrivana sentrivana commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Description

Decouple subprocess breadcrumbs from span data.

Issues

Closes #7068

Move subprocess breadcrumb creation from the centralized
`maybe_create_breadcrumbs_from_span` hook into the stdlib integration's
`Popen.__init__` wrapper. This makes breadcrumbs work for both legacy
spans and streamed spans, and removes the dependency on span internals.
@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Codecov Results 📊

99250 passed | ⏭️ 6479 skipped | Total: 105729 | Pass Rate: 93.87% | Execution Time: 353m 0s

📊 Comparison with Base Branch

Metric Change
Total Tests
Passed Tests
Failed Tests
Skipped Tests

✨ No test changes detected

All tests are passing successfully.

✅ Patch coverage is 100.00%. Project has 2501 uncovered lines.
✅ Project coverage is 89.99%. Comparing base (base) to head (head).

Coverage diff
@@            Coverage Diff             @@
##          main       #PR       +/-##
==========================================
+ Coverage    89.96%    89.99%    +0.03%
==========================================
  Files          193       193         —
  Lines        24975     24974        -1
  Branches      9010      9008        -2
==========================================
+ Hits         22467     22473        +6
- Misses        2508      2501        -7
- Partials      1437      1437         —

Generated by Codecov Action

@sentrivana sentrivana changed the title ref: Move breadcrumb creation from span hook to integrations ref: Move subprocess breadcrumbs to integration Aug 7, 2026
Comment thread sentry_sdk/tracing_utils.py
@sentrivana
sentrivana marked this pull request as ready for review August 7, 2026 07:59
@sentrivana
sentrivana requested a review from a team as a code owner August 7, 2026 07:59

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 0ea13df. Configure here.

Comment thread sentry_sdk/integrations/stdlib.py Outdated

@alexander-alderman-webb alexander-alderman-webb left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

Comment thread sentry_sdk/integrations/stdlib.py Outdated

env = None

with capture_internal_exceptions():

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this wasn't in a try...except before as far as I can tell, so probably okay to go without a capture_internal_exceptions(), but doesn't really matter.

@sentrivana
sentrivana enabled auto-merge (squash) August 7, 2026 09:11
@sentrivana
sentrivana merged commit dcd8b3b into master Aug 7, 2026
269 of 273 checks passed
@sentrivana
sentrivana deleted the ivana/move-breadcrumbs-to-integrations branch August 7, 2026 09:18
mgaligniana pushed a commit to mgaligniana/sentry-python that referenced this pull request Aug 9, 2026
### Description
Decouple subprocess breadcrumbs from span data.

#### Issues
Closes getsentry#7068
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Set breadcrumbs for subprocesses in the streaming trace lifecyle

2 participants